package com.cby.jetpack.sample.appstartup;

import android.content.Context;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.startup.Initializer;

import com.cby.jetpack.sample.appstartup.init.SDKTwo;

/**
 * Description:Sdk2Initializer，用来初始化，替代在application或者contentProvider中初始化
 *
 * @author 陈宝阳
 * @create 2020/6/29 17:07
 */
public class Sdk2Initializer implements Initializer<SDKTwo> {


  @NonNull
  @Override
  public SDKTwo create(@NonNull Context context) {
    SDKTwo.getInstance().init(context);
    return SDKTwo.getInstance();
  }

  @NonNull
  @Override
  public List<Class<? extends Initializer<?>>> dependencies() {
    List<Class<? extends Initializer<?>>> dependencies = new ArrayList<>();
    dependencies.add(Sdk1Initializer.class);
    return dependencies;
  }
}